package gokyesil.game.aygitciklar.model;

import com.badlogic.gdx.physics.box2d.BodyDef;
import com.badlogic.gdx.physics.box2d.FixtureDef;
import com.badlogic.gdx.physics.box2d.PolygonShape;
import com.badlogic.gdx.physics.box2d.World;
import com.badlogic.gdx.physics.box2d.BodyDef.BodyType;
public class EndBox extends Box
{
	public EndBox(World physWorld, float _posX, float _posY)
	{
		health = 1.1f;
		width = 1.6f;
		height = 1.6f;
		density = 1.0f;
		BodyDef bodyDef = new BodyDef();
	    bodyDef.type = BodyType.StaticBody;
		bodyDef.position.set(_posX+width/2.0f, _posY+height/2.0f);
	    body = physWorld.createBody(bodyDef);
	    PolygonShape dynamicBox = new PolygonShape();
	    dynamicBox.setAsBox(width/2.0f, height/2.0f);
	    FixtureDef fixtureDef = new FixtureDef();
	    fixtureDef.shape = dynamicBox;
	    fixtureDef.density = density; 
	    fixtureDef.friction = 0.3f;
	    fixtureDef.restitution = 0.3f;
	    body.createFixture(fixtureDef);
	}
}